%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/relay.defaultNodeIdCodec.createLeftArm"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 14, 15, 2, 17, 32<br /><br />1: PgInsertSingle[11]<br />2: <br />ᐳ: Object[16]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 2, 11, 16, 17, 32<br /><br />ROOT Object{1}ᐸ{result}ᐳ[16]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 11, 17, 26, 32<br /><br />ROOT PgInsertSingle{1}ᐸleft_arm()ᐳ[11]<br />1: <br />ᐳ: 19, 18, 20, 21, 22, 30, 31<br />2: PgSelect[23]<br />3: PgSelectRows[28]<br />ᐳ: First[27], PgSelectSingle[29]"):::bucket
    Bucket4("Bucket 4 (nullableBoundary)<br />Deps: 29, 11, 32<br /><br />ROOT PgSelectSingle{3}ᐸpersonᐳ[29]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket3
    Bucket3 --> Bucket4

    %% plan dependencies
    __InputObject8{{"__InputObject[8∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ0.69ᐳ[36]<br />- Constantᐸ'people|6'ᐳ[37]"}}:::plan
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject8 --> __InputObject6
    Object14{{"Object[14∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access12{{"Access[12∈0] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access13{{"Access[13∈0] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access12 & Access13 --> Object14
    ApplyInput15{{"ApplyInput[15∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput15
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ<br />Dependents: 4"]:::plan
    PgInsertSingle11[["PgInsertSingle[11∈1] ➊<br />ᐸleft_arm()ᐳ"]]:::sideeffectplan
    Object14 & ApplyInput15 --> PgInsertSingle11
    Object16{{"Object[16∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgInsertSingle11 --> Object16
    Object26{{"Object[26∈2] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access24{{"Access[24∈2] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access25{{"Access[25∈2] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access24 & Access25 --> Object26
    List20{{"List[20∈3] ➊<br />ᐸ17,18ᐳ<br />More deps:<br />- Constantᐸ'left_arms'ᐳ[17]"}}:::plan
    PgClassExpression18{{"PgClassExpression[18∈3] ➊<br />ᐸ__left_arm__.”id”ᐳ"}}:::plan
    PgClassExpression18 --> List20
    PgSelect23[["PgSelect[23∈3] ➊<br />ᐸpersonᐳ"]]:::plan
    PgClassExpression22{{"PgClassExpression[22∈3] ➊<br />ᐸ__left_arm...person_id”ᐳ"}}:::plan
    Object26 & PgClassExpression22 --> PgSelect23
    Access19{{"Access[19∈3] ➊<br />ᐸ11.tᐳ"}}:::plan
    Access19 --> PgClassExpression18
    PgInsertSingle11 --> Access19
    Lambda21{{"Lambda[21∈3] ➊<br />ᐸpipeStringEncodeᐳ"}}:::plan
    List20 --> Lambda21
    Access19 --> PgClassExpression22
    First27{{"First[27∈3] ➊"}}:::plan
    PgSelectRows28[["PgSelectRows[28∈3] ➊"]]:::plan
    PgSelectRows28 --> First27
    PgSelect23 --> PgSelectRows28
    PgSelectSingle29{{"PgSelectSingle[29∈3] ➊<br />ᐸpersonᐳ"}}:::plan
    First27 --> PgSelectSingle29
    PgClassExpression30{{"PgClassExpression[30∈3] ➊<br />ᐸ__left_arm...in_metres”ᐳ"}}:::plan
    Access19 --> PgClassExpression30
    PgClassExpression31{{"PgClassExpression[31∈3] ➊<br />ᐸ__left_arm__.”mood”ᐳ"}}:::plan
    PgClassExpression30 o--o PgClassExpression31
    List34{{"List[34∈4] ➊<br />ᐸ32,33ᐳ<br />More deps:<br />- Constantᐸ'people'ᐳ[32]"}}:::plan
    PgClassExpression33{{"PgClassExpression[33∈4] ➊<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgClassExpression33 --> List34
    PgSelectSingle29 --> PgClassExpression33
    Lambda35{{"Lambda[35∈4] ➊<br />ᐸpipeStringEncodeᐳ"}}:::plan
    List34 --> Lambda35

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,__InputObject8,Access12,Access13,Object14,ApplyInput15 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgInsertSingle11,Object16 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,Access24,Access25,Object26 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PgClassExpression18,Access19,List20,Lambda21,PgClassExpression22,PgSelect23,First27,PgSelectRows28,PgSelectSingle29,PgClassExpression30,PgClassExpression31 bucket3
    classDef bucket4 stroke:#0000ff
    class Bucket4,PgClassExpression33,List34,Lambda35 bucket4

    %% implicit side effects
    PgInsertSingle11 -.-o Access24
    PgInsertSingle11 -.-o Access25

